package com.yjc.hire.exceptions;

import com.yjc.hire.grace.result.ResponseStatusEnum;

/**
 * <p>
 *
 * @author jcyin
 * @since 2025/7/3
 * </p>
 */

/**
 * 自定义异常
 */
public class MyCustomException extends RuntimeException {
    private ResponseStatusEnum responseStatusEnum;

    public ResponseStatusEnum getResponseStatusEnum() {
        return responseStatusEnum;
    }

    public void setResponseStatusEnum(ResponseStatusEnum responseStatusEnum) {
        this.responseStatusEnum = responseStatusEnum;
    }

    public MyCustomException(ResponseStatusEnum responseStatusEnum) {
        super("异常状态码为" + responseStatusEnum.status() +
                "异常信息为" + responseStatusEnum.msg());
        this.responseStatusEnum = responseStatusEnum;
    }
}
